#include <stdio.h>
#define size 7
int main()
{
    int a[size][size] = {0};
    for (int i = 0; i < size; i++)
    {
        for (int j = 0; j <= i; j++)
        {
            if (j == 0 || j == i)
            {
                a[i][j] = 1;
                continue;
            }

            a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
        }
    }
    for (int i = 0; i < size; i++)
    {
        for (int k = 0; k < size - i - 1; k++)
        {
            printf("  ");
        }
        for (int j = 0; j <= i; j++)
        {
            printf("%2d  ", a[i][j]);
        }
        printf("\n");
    }
    return 0;
}